import request from "./request";

const Http = {
    get: async (url: string, data?: Object) => {
        return await request(url, {
            method: 'GET',
            data: data
        });
    },
    post: async (url: string, data?: Object) => {
        return await request(url, {
            method: 'POST',
            data: data
        });
    },
    put: async (url: string, data?: Object) => {
        return await request(url, {
            method: 'PUT',
            data: data
        });
    },
    delete: async (url: string, data?: Object) => {
        return await request(url, {
            method: 'DELETE',
            data: data
        });
    }
}
export default Http;